package com.jr.controller;

import com.google.gson.Gson;
import com.jr.entity.Job;
import com.jr.service.JobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Summer
 * @email 2838259857@qq.com
 * @date 2023-01-12-20:29
 */
@RestController
public class JobController {
    @Autowired
    private JobService jobService;

    /**
     * 企业名称超链接页面跳转
     */
    @RequestMapping(value = "getjobAll.do", produces = "text/html;charset=utf-8")
    public @ResponseBody String getAll() {

        List<Job> allJob = jobService.getJobAll();

        return new Gson().toJson(allJob);
    }
}


